Skip to content

Conversation

mashhurs
Copy link
Collaborator

@mashhurs mashhurs commented Dec 8, 2024

Description

Reconstructs pull-request, build and E2E pipeline jobs in a way of reflecting recent version expansion.
The pull request script is same as we have in 8.x. However, build and E2E differ in a way which

  • build/E2E periodically (scheduled) visits every branch and validate
  • when PR is merged or PR is manually kicked through BK pipeline, it runs with PR changes against main

Results:

@mashhurs mashhurs force-pushed the rebuild-main-pipelines branch from 6b5faf1 to 225a119 Compare December 10, 2024 06:03
@mashhurs mashhurs marked this pull request as ready for review December 10, 2024 06:08
@elasticmachine
Copy link
Collaborator

elasticmachine commented Dec 10, 2024

💚 Build Succeeded

@mashhurs mashhurs requested a review from donoghuc December 10, 2024 06:20
@mashhurs mashhurs changed the title Rebuilds pull-request, build and E2E pipelines for main branch. [main branch] Rebuilds pull-request, build and E2E pipelines. Dec 10, 2024
@yaauie
Copy link
Member

yaauie commented Dec 10, 2024

Instead of having the various step-builders iterate over logstash's
ci/logstash_releases.json@main
and programmatically determine which to run, I would prefer to have the canonical source be a branch-specific config file with the list of things to run if they can be resolved. This inversion keeps the mapping of what Logstashes are supported by the plugin local to the plugin's source which cannot drift.

For example, on any 8.${x} branch, we always want to test PR's against the upcoming, current, and previous supported 8.x versions, but we don't care about the plugin's ability to run against an unrelesaed possibly-breaking Logstash 9, so the config file would look like:

.buildkite/[email protected]

releases:
 - 8.current
 - 8.previous
snapshots:
 - 8.future
 - 8.next
 - 8.current
 - 8.previous

And on the main branch (9.x) before the 9.0 FF and 8.last FF, we need to only test against the snapshots for unreleased Logstash 9 and Logstash 8.future, but since we tolerate null-derefs, we can preemptively add everything so that it will just work once we start getting 9.x snapshots and releases:

.buildkite/pull-request-matrix.yaml@main (9.x)

releases:
 - 9.current # null-deref-ok
 - 9.previous # null-deref-ok
snapshots:
 - main
 - 9.future # null-deref-ok
 - 9.next # null-deref-ok
 - 9.current # null-deref-ok
 - 9.previous # null-deref-ok
 - 8.future

The only really interesting but is that once the 8.last branch has been cut and 8.future disappears, we will need to remap our 8.future snapshot reference to 8.next.

.buildkite/pull-request-matrix.yaml@main (9.x)

 releases:
  - 9.current # null-deref-ok
  - 9.previous # null-deref-ok
 snapshots:
  - main
  - 9.future # null-deref-ok
  - 9.current # null-deref-ok
  - 9.previous # null-deref-ok
- - 8.future
+ - 8.next

And then once 8.last has a release we will need to add it to the matrix and swap 8.next for 8.current:

.buildkite/pull-request-matrix.yaml@main (9.x)

 releases:
  - 9.current # null-deref-ok
  - 9.previous # null-deref-ok
+ - 8.current
 snapshots:
  - main
  - 9.future # null-deref-ok
  - 9.current # null-deref-ok
  - 9.previous # null-deref-ok
- - 9.next
+ - 8.current

@mashhurs mashhurs marked this pull request as draft December 13, 2024 21:01
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mashhurs

@mashhurs mashhurs marked this pull request as ready for review December 13, 2024 21:59
Copy link
Member

@donoghuc donoghuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for linking the builds based on these.

@mashhurs
Copy link
Collaborator Author

Thanks for linking the builds based on these.

Yup, thank you!
As stated in the description, we cannot run scheduled builds/E2E-tests (confirmed them on my local but BK env vars cannot be involved). The only manual way is to land this change and kick off CIs on BK ui with main branch. I will merge and kick them off, if there is anything strange, I will follow up.

@mashhurs mashhurs merged commit 016c4aa into elastic:main Dec 13, 2024
2 checks passed
@mashhurs mashhurs deleted the rebuild-main-pipelines branch December 13, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants